//
//  UILabel-Extension.swift
//  sinaWeibo
//
//  Created by maoge on 16/4/16.
//  Copyright © 2016年 maoge. All rights reserved.
//

import UIKit

extension UILabel {

    convenience init(textColor: UIColor, fontSize: CGFloat, preferredMaxLayoutWidth: CGFloat = 0) {
        self.init()
        self.textColor = textColor
        font = UIFont.systemFontOfSize(fontSize)

        if preferredMaxLayoutWidth > 0 {
            self.frame.size.width = preferredMaxLayoutWidth
            numberOfLines = 0
        }
    }

}
